Skip null groups in group manager #3884
Merged
Merged
Conversation
MorrisJobke
commented
Mar 17, 2017
Member
- downstream of Skip null groups in group manager (#26871) owncloud/core#26956
MorrisJobke
requested review from
LukasReschke,
icewind1991,
nickvergessen,
rullzer and
schiessle
March 17, 2017 00:09
|
@MorrisJobke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rullzer, @nickvergessen and @schiessle to be potential reviewers. |
* Skip null groups in group manager (#26871) * Skip null groups in group manager * Also skip null groups in group manager's search function * Add more group null checks in sharing code * Add unit tests for null group safety in group manager * Add unit tests for sharing code null group checks * Added tests for null groups handling in sharing code * Ignore moveShare optional repair in mount provider In some cases, data is inconsistent in the oc_share table due to legacy data. The mount provider might attempt to make it consistent but if the target group does not exist any more it cannot work. In such case we simply ignore the exception as it is not critical. Keeping the exception would break user accounts as they would be unable to use their filesystem. * Adjust null group handing + tests * Fix new group manager tests Signed-off-by: Morris Jobke <hey@morrisjobke.de>
MorrisJobke
force-pushed
the
downstream-26956
branch
from
March 17, 2017 06:07
4ea3c61 to
377fdf3
Compare
rullzer
approved these changes
Mar 17, 2017
| @@ -779,7 +779,7 @@ protected function canAccessShare(\OCP\Share\IShare $share, $checkGroups = true) | |||
| if ($checkGroups && $share->getShareType() === \OCP\Share::SHARE_TYPE_GROUP) { | |||
| $sharedWith = $this->groupManager->get($share->getSharedWith()); | |||
| $user = $this->userManager->get($this->currentUser); | |||
Member
There was a problem hiding this comment.
We could also save this call for $sharedWith === null
But since this is only for an error case it's probably okay
Signed-off-by: Joas Schilling <coding@schilljs.com>
nickvergessen
approved these changes
Mar 17, 2017
nickvergessen
left a comment
Member
There was a problem hiding this comment.
Added DI and fixed some code styling in the test
Member
|
Breaks with php5.6: |
Signed-off-by: Joas Schilling <coding@schilljs.com>
This was referenced Jul 20, 2017
Member
Author
|
@karlitschek A backport to 11 of this is needed for #5636 - opened in #5636 |
Member
|
please backport 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.